How to install PHP 8.2 on Alma Linux 8 |
您所在的位置:网站首页 › linux yum search › How to install PHP 8.2 on Alma Linux 8 |
A quick rundown Alma Linux is an Open Source, community-governed, and forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. AlmaLinux OS is 1:1 binary compatible with RHEL® and pre-Stream CentOS. Rocky Linux is a community enterprise operating system designed to be 100% bug-for-bug compatible with America’s top enterprise Linux distribution now that its downstream partner has shifted direction. It is under intensive development by the community. Rocky Linux is led by Gregory Kurtzer, founder of the CentOS project. PrerequsitiesBefore we install PHP 8 on our server, we will need a few things. A server running either Alma or Rocky Linux. (I’m using a dedicated server from Spin Servers.)A cup of hot tea or coffee.Step 1 — Update your systemAlways a good first step would be to update your operating system to the latest version. First, check for an update using the command below: $ sudo dnf check-updateIf an update is found, run this command to update the OS. $ sudo yum update -yAfter the update, run the check-update command again to ensure the system is up-to-date. $ sudo yum update -yOnce the system is updated, reboot the system using: $ sudo rebootStep 2— Enable REMI RepositoryBefore we install PHP 8.2 on our system we need to install EPEL (extra packages for enterprise Linux). This provides us access to enterprise software packages. Install EPEL: $ sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmInstall REMI: $ sudo dnf -y install http://rpms.remirepo.net/enterprise/remi-release-8.rpmupdate DNF cache: $ sudo dnf makecache -yList the repositories to ensure they are installed using the command below. $ sudo dnf repolistNow we can begin to install PHP 8.2 on our system. First, let's reset the default PHP module. $ sudo dnf module reset php -yEnable the PHP 8.2 REMI module. Press the Y key and press enter to continue. $ sudo dnf module install php:remi-8.2Install PHP 8.2. $ sudo dnf -y install phpCheck that PHP is running and the correct version is installed by running the command: $ php -vAt this point, PHP 8.2 has been successfully installed on your system. Typically PHP isn’t much use on its own as you will likely need modules like mbstring, openssl, and curl to name a few. You can install the addon modules in step 4. Step 4 — Extend PHP using modulesTo view a list of all the installable PHP modules use this command: $ php -mThis will output a list as you see below. Here you can pick which modules to install and use the command below with the modules you would like installed. $ sudo dnf install php-{common,pear,cgi,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap}Press the Y key and enter to continue the installation. Once the installation finishes you will have an Alma Linux 8 instance with PHP 8.2 installed. In order to provide you with these short how-to’s, I use a dedicated server from Spin Servers. Below you will find a few offers from them for quality dedicated web hosting. Intel E5–1280 v5 4 x 3.7 Ghz 32 GB DDR4 1 TB M.2 NVMe SSD 10 TB Bandwidth @ 10Gbps 1 IPv4 Address Dallas, TX Location $99 No Code Needed! https://www.spinservers.com/cart.php?a=add&pid=154 Dual E5–2630L v3 16 x 1.8 GHz 64GB DDR4 1.6 TB NVMe SSD 10TB Bandwidth @ 10Gbps 1 IPv4 Address Dallas, TX Location $139 Use Promo Code: WHT$13922 at checkout https://www.spinservers.com/cart.php?a=add&pid=130 Dual E5–260L v3 16 x 2.9 GHz Turbo 64GB DDR4 1.6TB NVMe SSD 10TB Bandwidth @ 10 Gbps 1 IPv4 Address San Jose, CA Location $139 Use Promo Code: SJC$40OFF at checkout https://www.spinservers.com/cart.php?a=add&pid=133If you have questions about any of our services, please contact us via email at [email protected] or by using our live chat at spinservers.com. Spin Servers is a US-based provider of dedicated servers & affordable private cloud solutions. Our motto is to let you “spin up servers” fast, seamlessly, and affordably. |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |